home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / langs / c68_445b.zoo / inc / mintbind.h next >
Encoding:
C/C++ Source or Header  |  1994-11-04  |  5.3 KB  |  116 lines

  1. /*
  2.  *    mintbind.h
  3.  */
  4.  
  5. #ifndef _MINTBIND_H
  6. #define _MINTBIND_H
  7.  
  8. #ifndef _OSBIND_H
  9. #include <osbind.h>
  10. #endif
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16.  
  17. #if defined(__C68__) || defined(__SOZOBON__)
  18.  
  19. #ifdef __C68__
  20.  
  21. __EXTERN long _trap_1_wwl    __PROTO((short,short,long));
  22. __EXTERN long _trap_1_wwlw    __PROTO((short,short,long,short));
  23. __EXTERN long _trap_1_wwww    __PROTO((short,short,short,short));
  24. __EXTERN long _trap_1_wwwl    __PROTO((short,short,short,long));
  25.  
  26. #else
  27.  
  28. #define    _trap_1_wwl    gemdos
  29. #define _trap_1_wwlw    gemdos
  30. #define _trap_1_wwww    gemdos
  31. #define _trap_1_wwwl    gemdos
  32.  
  33. #endif
  34.  
  35. #define    Syield()        (short)_trap_1_w((short)0xff)
  36. #define Fpipe(ptr)        (short)_trap_1_wl((short)0x100,(long)(ptr))
  37. #define Fcntl(f,arg,cmd)    _trap_1_wwlw((short)0x104,(short)(f),(long)(arg),(short)(cmd))
  38. #define Finstat(f)        _trap_1_ww((short)0x105,(short)(f))
  39. #define Foutstat(f)        _trap_1_ww((short)0x106,(short)(f))
  40. #define Fgetchar(f,mode)    _trap_1_www((short)0x107,(short)(f),(short)(mode))
  41. #define Fputchar(f,ch,mode)    _trap_1_wwlw((short)0x108,(short)(f),(long)(ch),(short)(mode))
  42. #define Pwait()            _trap_1_w((short)0x109)
  43. #define Pnice(delta)        (short)_trap_1_ww((short)0x10a,(short)(delta))
  44. #define Pgetpid()        (short)_trap_1_w((short)0x10b)
  45. #define Pgetppid()        (short)_trap_1_w((short)0x10c)
  46. #define Pgetpgrp()        (short)_trap_1_w((short)0x10d)
  47. #define Psetpgrp(pid, grp)    (short)_trap_1_www((short)0x10e,(short)(pid),(short)(grp))
  48. #define Pgetuid()        (short)_trap_1_w((short)0x10f)
  49. #define Psetuid(id)        (short)_trap_1_ww((short)0x110,(short)(id))
  50. #define Pkill(pid,sig)        (short)_trap_1_www((short)0x111,(short)(pid),(short)(sig))
  51. #define Psignal(sig, handler)    _trap_1_wwl((short)0x112,(short)(sig),(long)(handler))
  52. #define Pvfork()        _trap_1_w((short)0x113)
  53. #define Pgetgid()        (short)_trap_1_w((short)0x114)
  54. #define Psetgid(id)        (short)_trap_1_ww((short)0x115,(short)(id))
  55. #define Psigblock(mask)        _trap_1_wl((short)0x116,(unsigned long)(mask))
  56. #define Psigsetmask(mask)    _trap_1_wl((short)0x117,(unsigned long)(mask))
  57. #define Pusrval(arg)        _trap_1_wl((short)0x118,(long)(arg))
  58. #define Pdomain(arg)        (short)_trap_1_ww((short)0x119,(short)(arg))
  59. #define Psigreturn()        (void)_trap_1_w((short)0x11a)
  60. #define Pfork()            _trap_1_w((short)0x11b)
  61. #define Pwait3(flag, rusage)    _trap_1_wwl((short)0x11c,(short)(flag),(long)(rusage))
  62. #define Fselect(time,r,w,x)    (short)_trap_1_wwlll((short)0x11d,(unsigned short)(time),(long)(r),(long)(w),(long)(x))
  63. #define Prusage(rsp)        (short)_trap_1_wl((short)0x11e,(long)(rsp))
  64. #define Psetlimit(i,val)    _trap_1_wwl((short)0x11f,(short)(i),(long)(val))
  65. #define Talarm(sec)        _trap_1_wl((short)0x120,(long)(sec))
  66. #define Pause()            (void)_trap_1_w((short)0x121)
  67. #define Sysconf(n)        _trap_1_ww((short)0x122,(short)(n))
  68. #define Psigpending()        _trap_1_w((short)0x123)
  69. #define Dpathconf(name, which)    _trap_1_wlw((short)0x124,(long)(name),(short)(which))
  70. #define Pmsg(mode, mbox, msg)    _trap_1_wwll((short)0x125,(short)(mode),(long)(mbox),(long)(msg))
  71. #define Fmidipipe(pid,in,out)    _trap_1_wwww((short)0x126,(short)(pid),(short)(in),(short)(out))
  72. #define Prenice(pid, delta)    (short)_trap_1_www((short)0x127,(short)(pid),(short)(delta))
  73. #define Dopendir(name, flag)    _trap_1_wlw((short)0x128,(long)(name),(short)(flag))
  74. #define Dreaddir(len,hdl,buf)    _trap_1_wwll((short)0x129,(short)(len),(long)(hdl),(long)(buf))
  75. #define Drewinddir(hdl)        _trap_1_wl((short)0x12a,(long)(hdl))
  76. #define Dclosedir(handle)    _trap_1_wl((short)0x12b,(long)(handle))
  77. #define Fxattr(flag,name,buf)    _trap_1_wwll((short)0x12c,(short)(flag),(long)(name),(long)(buf))
  78. #define Flink(old,new)        _trap_1_wll((short)0x12d,(long)(old),(long)(new))
  79. #define Fsymlink(old, new)    _trap_1_wll((short)0x12e,(long)(old),(long)(new))
  80. #define Freadlink(siz,buf,lnkn)    _trap_1_wwll((short)0x12f,(short)(siz),(long)(buf),(long)(lnkn))
  81. #define Dcntl(cmd,name,arg)    _trap_1_wwll((short)0x130,(short)(cmd),(long)(name),(long)(arg))
  82. #define Fchown(name, uid, gid)    _trap_1_wlww((short)0x131,(long)(name),(short)(uid),(short)(gid))
  83. #define Fchmod(name, mode)    _trap_1_wlw((short)0x132,(long)(name),(short)(mode))
  84. #define Pumask(mask)        (short)_trap_1_ww((short)0x133,(short)(mask))
  85. #define Psemaphore(mode,id,out)    _trap_1_wwll((short)0x134,(short)(mode),(long)(id),(long)(out))
  86. #define Dlock(mode, drive)    (short)_trap_1_www((short)0x135,(short)(mode),(short)(drive))
  87. #define Psigpause(mask)        (void)_trap_1_wl((short)0x136,(unsigned long)(mask))
  88. #define Psigaction(sig,act,oac)    _trap_1_wwll((short)0x137,(short)(sig),(long)(act),(long)(oac))
  89. #define Pgeteuid()        (short)_trap_1_w((short)0x138)
  90. #define Pgetegid()        (short)_trap_1_w((short)0x139)
  91. #define Pwaitpid(pid,flag,rusg)    _trap_1_wwwl((short)0x13a,(short)(pid),(short)(flag),(long)(rusg))
  92. #define Dgetcwd(path,drv,size)    _trap_1_wlww((short)0x13b,(long)(path),(short)(drv),(short)(size))
  93. #define Salert(msg)        _trap_1_wl((short)0x13c,(long)(msg))
  94.  
  95. /* The following are not yet official... */
  96. #define Tmalarm(ms)        _trap_1_wl((short)0x13d,(long)(ms))
  97. #define Psigintr(vec, sig)    _trap_1_www((short)0x13e,(short)(vec),(short)(sig))
  98. #define Suptime(uptime,avenrun)    _trap_1_wll((short)0x13f,(long)(uptime),(long)(avenrun))
  99.  
  100.  
  101. #else /* !__C68__ */
  102.  
  103. /* Support for GCC, Pure C/Turbo C and Lattice C
  104.  * has been removed - if you've got one of these
  105.  * compilers, use the original mintbind.h to add
  106.  * the needed bits...
  107.  */
  108.  
  109. #endif /* __C68__ */
  110.  
  111. #ifdef __cplusplus
  112. }
  113. #endif
  114.  
  115. #endif /* _MINTBIND_H */
  116.